import request from '@/api/axiosRequest'

//列出镜像
export const listImagesReq = (imageName: string[]) => {
  return request({
    url: '/images/json',
    params: {
      filters: JSON.stringify({
        reference: imageName
      })
    }
  })
}

//创建镜像
//存在问题，拉取镜像太大的话可能超时
export const createImagesReq = (imageName: string) => {
  return request({
    url: '/images/create',
    method: 'post',
    timeout: 60 * 1000,
    params: {
      fromImage: imageName
    }
  })
}
